Entity Entity

Entity contains functions which control game entities.

It is the parent class of all entity types in Fallout: Tactics. Functions described here are available to be called for any type of entity.

Functions

GetName () GetName returns the printable name of the entity.
GetInternalName () GetInternalName returns the internal name of the entity.
GetTag () GetTag returns the TagName value for the entity.
GetBaseID () GetBaseID returns the ID value of the entity from the World entity table.
GetPosition () GetPosition returns the position of the entity.
GetEntitySubType () GetEntitySubType retrns the subtype of the given entity.
GetMaxRange (a) GetMaxRange returns the range of a weapon, if held by the given Actor.
GetMinEffectiveDamage (a) GetMinEffectiveDamage returns the minimum damage of a weapon, if held by the given Actor.
GetMaxEffectiveDamage (a) GetMaxEffectiveDamage returns the maximum damage of a weapon, if held by the given Actor.
AddToInventory (e, count) AddToInventory adds the given entity to this entity's inventory.
RemoveInventory (e, count) RemoveInventory removes the given entity from this entity's inventory.
Destruct () Destruct removes the entity from the game state.

Fields

isEntity Indicates that the object is an entity.
ClassType Contains a string value indicating the type of entity.


Functions

GetName ()
GetName returns the printable name of the entity.

Returns:

    A string containing the entity's name.
GetInternalName ()
GetInternalName returns the internal name of the entity. Retrieving this name is considerably faster than GetName, so it should be used for cases where the entity name doesn't need to be displayed to the player.

Returns:

    A string containing the entity's internal name.
GetTag ()
GetTag returns the TagName value for the entity.

Returns:

    A string containing the entity's TagName.
GetBaseID ()
GetBaseID returns the ID value of the entity from the World entity table. NOTE that saving ID values is not advised for any purpose, as they will change frequently (inventory items change any time they are dropped or equipped, for example).

Returns:

    An integer value containing the current value of the entity's ID.
GetPosition ()
GetPosition returns the position of the entity.

Returns:

    A table containing fields "x", "y", and "z" for the entity's position.
GetEntitySubType ()
GetEntitySubType retrns the subtype of the given entity. The meaning of the subtype depends on the type of entity. For example, Actor uses this field as the creature type or race, Armour uses it as the armour material type, etc.

Returns:

    A string containing the entity's subtype.
GetMaxRange (a)
GetMaxRange returns the range of a weapon, if held by the given Actor. This function takes as a parameter an Actor object. The range will be calculated as if the Actor has equipped this weapon. While this field is implemented for Entity types, it may only return reasonable values for Weapon type entities. Return values for other types of entities are currently unknown.

Parameters:

  • a An Actor object to use when determining the weapon's range.

Returns:

    A numeric value containing the Weapon's maximum range.
GetMinEffectiveDamage (a)
GetMinEffectiveDamage returns the minimum damage of a weapon, if held by the given Actor. This function takes as a parameter an Actor object. The damage will be calculated as if the Actor has equipped this weapon. While this field is implemented for Entity types, it may only return reasonable values for Weapon type entities. Return values for other types of entities are currently unknown.

Parameters:

  • a An Actor object to use when determining the weapon's minimum damage.

Returns:

    A numeric value containing the Weapon's minimum damage.
GetMaxEffectiveDamage (a)
GetMaxEffectiveDamage returns the maximum damage of a weapon, if held by the given Actor. This function takes as a parameter an Actor object. The damage will be calculated as if the Actor has equipped this weapon. While this field is implemented for Entity types, it may only return reasonable values for Weapon type entities. Return values for other types of entities are currently unknown.

Parameters:

  • a An Actor object to use when determining the weapon's maximum damage.

Returns:

    A numeric value containing the Weapon's maximum damage.
AddToInventory (e, count)
AddToInventory adds the given entity to this entity's inventory. This function is only implemented for Actor, Container, and Vehicle entity types.

Parameters:

  • e The Entity to add to the inventory of this Entity.
  • count (optional) How many objects from the Entity to add to inventory (allows partial success).

Returns:

    If successful, nothing is returned.

Or

  1. If failed to add to inventory, the first part of the return is the error string returned by AddInventory.
  2. If failed to add to inventory, the second part of the return is the remainder of the Entity that was not added (in case of partial success).
RemoveInventory (e, count)
RemoveInventory removes the given entity from this entity's inventory. This function is only implemented for Actor, Container, and Vehicle entity types.

Parameters:

  • e The Entity to remove from the the inventory of this Entity.
  • count (optional) How many objects to remove from the inventory.

Returns:

    If successful, returns the Entity that was removed.

Or

    If failed, returns a string indicating the reason for failure.
Destruct ()
Destruct removes the entity from the game state. This should be called only on entities which have been removed from an inventory. If called on a world item, or on an object still in an inventory, results are unknown.

Returns:

    None.

Fields

isEntity
Indicates that the object is an entity. This value will be true for all Entity subclasses.
  • isEntity
ClassType
Contains a string value indicating the type of entity. This will be overwritten by all Entity subclasses.
  • ClassType
generated by LDoc 1.4.6 Last updated 2021-05-07 19:14:47